package com.vhall.component.entity.rbac.vo;

import com.vhall.component.framework.common.annotation.ParamName;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author lsl
 * @since 2021/7/30
 */
@Data
public class EditActionReqVO implements Serializable {

    @ParamName("role_id")
    @NotNull(message = "角色id不能为空")
    private Integer roleId;

    @ParamName("action_ids")
    @NotBlank(message = "action_ids不能为空")
    @Pattern(regexp = "^(?!,)[\\d,]*(?<!,)$", message = "action_ids参数错误，请传入正确的格式，多个Id请以逗号分割，且不以逗号开始或者结尾")
    private String actionIds;

}
